<template>
    <el-row :gutter="10" class="project">
        <el-col style="margin-bottom: 0" :xs="24" :sm="8" :md="8" :lg="8" :xl="8" v-for="(item,index) in projectList" :key="item.name">
          <div :class="['project-item','project-item' + index]">
            <div class="project-name">{{ item.name }}</div>
            <div class="project-pay">
              <div class="project-amount">
                ₹
                <count-to :startVal='0' :endVal='item.amount' :duration='1000'></count-to>
               </div>
              <img v-if="index === 0" src="@/assets/image/收款.png" alt="">
              <img style="width: 32px;height: 32px" v-if="index === 1" src="@/assets/image/打款.png" alt="">
              <img v-if="index === 2" src="@/assets/image/提现.png" alt="">
            </div>
            <div class="project-value">
              <div>{{ item.desc }}</div>
              <div>{{ item.count }}</div>
            </div>
          </div>
        </el-col>
    </el-row>
</template>

<script>
import countTo from 'vue-count-to';
export default {
    name:'ProjectBox',
    data(){
        return {
          projectList: [
            {
              name: '收款',
              amount: 1000.00,
              desc: '成功收款数',
              count: 100
            },
              // 打款、成功打款数
            {
              name: '打款',
              amount: 1000.00,
              desc: '成功打款数',
              count: 100
            },
              // 提现/转账、成功单数
            {
              name: '提现/转账',
              amount: 1000.00,
              desc: '成功单数',
              count: 100
            }
          ]
        }
    },
    components:{
        countTo
    }
}
</script>

<style lang="scss">
@media only screen and (max-width: 767px) {
  .el-col-xs-24 {
    border-bottom: 1px solid #dcdfe6;
  }
}
.project-item {
  display: flex;
  flex-direction: column;
  padding: 24px;
  padding-bottom: 14px;
  &.project-item {
    border-left: 1px solid #dcdfe6;
  }
  .project-name {
    font-size: 18px;
    padding-left: 16px;
  }
  .project-pay {
    height: 50px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 24px;
    img {
      width: 40px;
      height: 40px;
    }
  }
  .project-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
  }
}
</style>
